﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FileData.Utils.Currency.TextUtils
{
    class SubstringEnhance
    {/// <summary>
     /// 切割字符串  注意，如果起始位置为 0 则返回""  
     /// </summary>
     /// <param name="SubText"></param>
     /// <param name="StartIndex"></param>
     /// <returns></returns>
        public string SubString(String SubText,int StartIndex) {

            string TempText = "";
            if (StartIndex == 0)
                return TempText;
            try {
                TempText= SubText.Substring(StartIndex);
            } catch (Exception ex) {

                PrintLog.Log(ex);
            }
            return TempText;
        }
        /// <summary>
        ///  切割字符串  
        /// </summary>
        /// <param name="StartIndex"></param>
        /// <param name="EndIndex"></param>
        /// <returns></returns>
        public string SubString(String SubText,int StartIndex,int EndIndex)
        {

            string TempText = "";
         
            try
            {
          TempText=      SubText.Substring(StartIndex, EndIndex);
            }
            catch (Exception ex)
            {

                PrintLog.Log(ex);
            }
            return TempText;
        }
    }
}
